from django.contrib import admin
from django.urls import path
#from django.conf.urls.static import static
from django.contrib.auth.views import LoginView, LogoutView
from app import forms, views

from . import settings

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', views.home, name='home'),
    path('login/',
         LoginView.as_view
             (
             template_name='app/login.html',
             authentication_form=forms.BootstrapAuthenticationForm,
             extra_context=
             {
                 'title': '登录',
             }
         ),
         name='login'),
    path('logout/', LogoutView.as_view(next_page='/'), name='logout'),
    path('blog/', views.blog, name='blog'),
    path('homework/', views.homework, name='homework'),
    path('video/', views.video, name='video'),
    path('listquestion/', views.listquestion, name='listquestion'),
    path('question/', views.question, name='question'),
    path('postsubmission/', views.postsubmission, name='postsubmission'),
    path('getsubmission/', views.getsubmission, name='getsubmission'),
    path('checktag/', views.checktag, name='checktag'),
    path('postdiscuss/', views.postdiscuss, name='postdiscuss'),
    path('downloadcase/', views.downloadcase, name='downloadcase'),

    path('getgroups/', views.getgroups, name='getgroups'),
    path('getusers/', views.getusers, name='getusers'),
    path('getusersubmission/', views.getusersubmission, name='getusersubmission'),
]
#urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
